#!/bin/bash
# ~/.config/dwm/statusbar/diagnose.sh

echo "=== DWM 状态栏诊断 ==="
echo "1. 检查状态栏脚本权限..."
ls -la ~/.config/dwm/statusbar/statusbar.py

echo -e "\n2. 检查 Python 版本..."
python3 --version

echo -e "\n3. 尝试直接运行状态栏脚本..."
python3 ~/.config/dwm/statusbar/statusbar.py cron

echo -e "\n4. 检查 common.py 是否存在..."
ls -la ~/.config/dwm/statusbar/common.py

echo -e "\n5. 检查模块文件是否存在..."
if [ -f ~/.config/dwm/statusbar/common.py ]; then
  echo "common.py 内容:"
  grep "PACKAGES_LISTS" ~/.config/dwm/statusbar/common.py
fi

echo -e "\n6. 检查是否有其他状态栏进程在运行..."
pgrep -af statusbar
